import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/goods/goodsSave',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/goods/deleteGoodsInfo?id=' + ids,
    method: 'get'
  })
}
// 任务详情
export function getGoodsDetail(id) {
  return request({
    url: '/api/goods/goodsInfo?id=' + id,
    method: 'get'
  })
}
// 任务状态修改
export function changeGoodsStatus(id) {
  return request({
    url: 'api/goods/changeGoodsStatus?id=' + id,
    method: 'get'
  })
}
// 任务状态修改
export function changeRecommend(id) {
  return request({
    url: '/api/goods/changeRecommend?id=' + id,
    method: 'get'
  })
}
export function edit(data) {
  return request({
    url: 'api/goods/goodsSave',
    method: 'post',
    data
  })
}
// 任务审批
export function userGoodsApprove(data) {
  return request({
    url: 'api/goods/userGoodsApprove',
    method: 'post',
    data
  })
}


export default { add, edit, del, changeGoodsStatus }
